home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / TeeChartPro / TeeChart5Delphi5Eval.exe / %MAINDIR% / Examples / DBChart aggregates / Base_DBChart.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-09-10  |  877 b   |  44 lines

  1. unit Base_DBChart;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   TeeProcs, TeEngine, Chart, DBChart, ExtCtrls, StdCtrls, DB, DBTables;
  8.  
  9. type
  10.   TBaseDBChart = class(TForm)
  11.     Memo1: TMemo;
  12.     Panel1: TPanel;
  13.     DBChart1: TDBChart;
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. procedure CheckTable(ATable: TTable);
  21.  
  22. implementation
  23.  
  24. {$R *.DFM}
  25.  
  26. procedure CheckTable(ATable: TTable);
  27. var tmp : TStringList;
  28. begin
  29.   tmp:=TStringList.Create;
  30.   try
  31.     Session.GetAliasNames(tmp);
  32.     if tmp.IndexOf(ATable.DatabaseName)=-1 then
  33.     begin
  34.       if tmp.IndexOf('BCDEMOS')=-1 then
  35.          Raise Exception.Create('Database BDE Alias "BCDEMOS" cannot be found.');
  36.       ATable.DatabaseName:='BCDEMOS';
  37.     end;
  38.   finally
  39.     tmp.Free;
  40.   end;
  41. end;
  42.  
  43. end.
  44.